package cn.dai;

public class Gamer {

    private String name;
    private int score;

    public String fist(int input){
        switch (input){
            case 1:
                return "石头";
            case 2:
                return "剪刀";
            case 3:
                return "布子";
            default:
                fist((int) (Math.random() * 10 % 3 + 1));
        }
        return null;
    }

    public String fist(){
        switch ((int) (Math.random() * 10 % 3 + 1)){
            case 1:
                return "石头";
            case 2:
                return "剪刀";
            case 3:
                return "布子";
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "Gamer{" +
                "name='" + name + '\'' +
                ", score=" + score +
                '}';
    }
}
